﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MediaBusiness.Common
{
    /// <summary>
    /// 
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
    public class CacheAttribute : System.Attribute
    {
        public CacheAttribute()
        {
            this.ExpireTime = 30 * 60;//默认30分钟
        }

        /// <summary>
        /// 过期时间单位秒（默认30分钟）
        /// </summary>
        public int ExpireTime { get; set; }

        /// <summary>
        /// 依赖的表名，如果对应的表数据有更新，则过期相应的缓存
        /// </summary>
        public string[] DepandencyTableNames { get; set; }
    }
}
